x86/cpuid: Handle leaf 0x80000000 in guest_cpuid()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 17 Jan 2017 16:52:14 +0000 (16:52 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 25 Jan 2017 10:24:39 +0000 (10:24 +0000)
commit9b6dea1859139fc823dedc30c177fcf8d308fdd7
tree3b048b41cf62d327fc9b9c71e59264ceea2a2df3
parent090d1a6908d2fba8c6657d7710d61ba360c9f248
x86/cpuid: Handle leaf 0x80000000 in guest_cpuid()

The calculations for p->extd.max_leaf are reworked to force a value of at
least 0x80000000, and to take the domains chosen vendor into account when
clamping maximum value.

The high short vendor information is clobbered or duplicated according to the
chosen vendor.

As a side effect of handing out an audited max_leaf value, the 0x8000001e case
can be dropped from pv_cpuid(), as it outside of the visible range.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Jan Beulich <JBeulich@suse.com>
xen/arch/x86/cpuid.c
xen/include/asm-x86/cpuid.h